exports.request = function(app,queryResponse){

  //模拟分页方法
function paging(reqBody, resData) {
  var page = {
    currentPage: Number(reqBody.currentPage),
    pageSize: Number(reqBody.pageSize)
  };
  var data = [];
  for (var currRow = (page.currentPage - 1) * page.pageSize; currRow < resData.length && currRow < page.currentPage * page.pageSize; currRow++) {
    data.push(resData[currRow]);
  }
  var responseValue = {
    "data": data,
    "num":[{totalCount:resData.length,totalSignNum:'123344',totalTermNum:'52432'}],
    "state": '10000'
  };
  return responseValue;
}
  //适应旧需求
	function pagingUpdate(reqBody,resData){
		var page = reqBody.page;
		var data=[];
		for(var currRow = (page.currentPage-1)*page.pageSize; currRow < resData.length && currRow <page.currentPage*page.pageSize; currRow++){
			data.push(resData[currRow]);
		};
		var responseValue = {
			state:'10000',
			data:{ pageData: data,totalCount:resData.length}
		};
		return responseValue;
	}
	
	//银行总对总签解约查询
  app.post('/sas/OMdisplay/bankATA/signTerminationQuery', function ( req,res){
    var action = paging(req.body,queryResponse.signData);
  	res.send(action);
  });
  //银行总对总下拉框查询
  app.get('/sas/OMdisplay/bankATA/bankList', function (req,res){
  	res.send(queryResponse.bankList);
  });
  //签约渠道下拉框
  app.post('/sas/common/accessChannelsQuery', function (req,res){
  	res.send(queryResponse.signChannelList);
  });
  //总对总签约分省占比
  app.post('/sas/OMdisplay/bankATA/stPieQuery',function (req,res){
    res.send(queryResponse.stPieData);
  });

	//旧需求

	app.post('/sas/OMdisplay/developmentAV/customerDevelopment/customerNum',function (req,res){
		var action= pagingUpdate(req.body,queryResponse.customerFormData);
		action.page={totalCount : action.totalCount };
		action.state='10000';
		res.send(action);
	});
//客户发展分析
	app.post('/sas/OMdisplay/developmentAV/customerDevelopment/customerAnalysis',function (req,res){
		res.send(queryResponse.customerData);
	});
//客户业务量查询
	app.post('/sas/OMdisplay/developmentAV/customerDevelopment/businessAnalysis',function (req,res){
		res.send(queryResponse.businessAnalysis);
	});
//客户价值分析
	app.post('/sas/OMdisplay/developmentAV/customerValue/valueAnalysis',function (req,res){
		res.send(queryResponse.valueData);
	});

//总体渠道运营分析
	app.post('/sas/OMdisplay/developmentAV/channelAnalysis/operationAnalysis',function (req,res){
		res.send(queryResponse.operationAnalysis);
	});
//签约缴费查询
	app.post('/sas/OMdisplay/developmentAV/customerDevelopment/signPayAnalysis',function (req,res){
		res.send(queryResponse.twoBusinessData);
	});
//渠道发展客户分析
	app.post('/sas/OMdisplay/developmentAV/channelAnalysis/developAnalysis',function (req,res){
		res.send(queryResponse.channelDevelopData);
	});
//业务渠道分析
	app.post('/sas/OMdisplay/developmentAV/channelAnalysis/customerAnalysis',function (req,res){
		res.send(queryResponse.channelAnalysisData);
	});
//天猫,移动,总对总渠道
	app.get('/sas/common/channelQuery',function (req,res){
		res.send(queryResponse.oldChannelData);
	});

//业务报表分析
	app.post('/sas/OMdisplay/PBossOM/businessReportAnalysis/businessDetail',function(req,res){
		var checkData = {state:'10000',data:{pageData:queryResponse.businessDetail}};
		res.send(checkData);
	});
	//用户状态
	app.get('/sas/OMdisplay/PBossOM/businessReportAnalysis/state',function(req,res){
		res.send(queryResponse.userStates);
	});
	//用户状态统计
	app.post('/sas/OMdisplay/PBossOM/businessReportAnalysis/userState',function(req,res){
    res.send(queryResponse.userStateData);
	});

	//工单类别
	app.get('/sas/OMdisplay/PBossOM/businessReportAnalysis/workOrderType',function(req,res){
		res.send(queryResponse.workOrderType);
	});
	//工单状态
	app.get('/sas/OMdisplay/PBossOM/businessReportAnalysis/workOrderState',function(req,res){
		res.send(queryResponse.workOrderState);
	});
  //工单等级
	app.get('/sas/OMdisplay/PBossOM/businessReportAnalysis/workOrderLevel',function(req,res){
		res.send(queryResponse.workOrderLevel);
	});
	//服务开通统计
	app.post('/sas/OMdisplay/PBossOM/businessReportAnalysis/serviceOpen',function(req,res){
		res.send(queryResponse.serviceOpenData);
	});

	//产品管理报表分析
	app.post('/sas/OMdisplay/PBossOM/businessReportAnalysis/productManagement',function(req,res){
		res.send(queryResponse.productData);
	});
	//行业下拉
	app.get('/sas/OMdisplay/PBossOM/businessReportAnalysis/industry',function(req,res){
		res.send(queryResponse.industrys);
	});
	//订购渠道
	app.get('/sas/OMdisplay/PBossOM/businessReportAnalysis/orderChannel',function(req,res){
		res.send(queryResponse.orderChannels);
	});
	//卡类型
	app.get('/sas/OMdisplay/PBossOM/businessReportAnalysis/cardType',function(req,res){
		res.send(queryResponse.cardTypes);
	});
	//用户类型
	app.get('/sas/OMdisplay/PBossOM/businessReportAnalysis/userType',function(req,res){
		res.send(queryResponse.userTypes);
	});
	//订购关系统计
	app.post('/sas/OMdisplay/PBossOM/businessReportAnalysis/orderRelation',function(req,res){
		res.send(queryResponse.orderRelations);
	});
	//运营准确性分析
	app.post('/sas/OMdisplay/businessOperationsAnalysis/accuracy',function(req,res){
		res.send(queryResponse.operationData);
	});
	//业务流程完整性分析
	app.post('/sas/OMdisplay/businessOperationsAnalysis/integrityAnalysis',function(req,res){
		res.send(queryResponse.integrityAnalysis);
	});
};